using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using IdentityServer4.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Yozeev.BusinessLogic
{
    /// <summary>
    /// 票据管理
    /// </summary>
    public class TicketDetail : ByBranchEntity<Guid>
    {
        /// <summary>
        /// 票号
        /// </summary>
        public string TicketNo { get; set; }
        /// <summary>
        /// 单据明细标识
        /// </summary>
        public Guid ActivityDetailId { get; set; }
        [ForeignKey("ActivityDetailId")]
        public virtual ActivityDetail ActivityDetail { get; set; }
        /// <summary>
        /// 单据标识
        /// </summary>
        public Guid ActivityId { get; set; }
        //[ForeignKey("ActivityId")]
        //public virtual Activity Activity { get; set; }
        /// <summary>
        /// 退单明细标识
        /// </summary>
        public Guid? OrgActivityDetailId { get; set; }
        //[ForeignKey("OrgActivityDetailId")]
        //public virtual ActivityDetail OrgActivityDetail { get; set; }
        /// <summary>
        /// 退单标识
        /// </summary>
        public Guid? OrgActivityId { get; set; }
        //[ForeignKey("OrgActivityId")]
        //public virtual Activity OrgActivity { get; set; }
        /// <summary>
        /// 会员标识
        /// </summary>
        public Guid CustomerId { get; set; }
        [ForeignKey("CustomerId")]
        public virtual Customer Customer { get; set; }
        /// <summary>
        /// 票型标识
        /// </summary>
        public Guid TicketId { get; set; }
        //[ForeignKey("TicketId")]
        //public virtual Ticket Ticket { get; set; }
        /// <summary>
        /// 二维码
        /// </summary>
        public string QRCode { get; set; }
        /// <summary>
        /// 可验票数
        /// </summary>
        public long CheckingQuantity { get; set; }
        /// <summary>
        /// 已验票数
        /// </summary>
        public long CheckedQuantity { get; set; }
        /// <summary>
        /// 有效开始时间
        /// </summary>
        public DateTime StartDateTime { get; set; }
        /// <summary>
        /// 有效结束时间
        /// </summary>
        public DateTime EndDateTime { get; set; }
        /// <summary>
        /// 验票方式
        /// </summary>
        public CheckMethodEnum CheckMethod { get; set; }
        /// <summary>
        /// 线路标识
        /// </summary>
        public Guid? RouteId { get; set; }
        [ForeignKey("RouteId")]
        public virtual Route Route { get; set; }
        /// <summary>
        /// 行程标识
        /// </summary>
        public Guid? ScheduleId { get; set; }
        [ForeignKey("ScheduleId")]
        public virtual Schedule Schedule { get; set; }
        /// <summary>
        /// 游船标识
        /// </summary>
        public Guid? BoatId { get; set; }
        [ForeignKey("BoatId")]
        public virtual Boat Boat { get; set; }
        /// <summary>
        /// 票据状态
        /// </summary>
        public TicketStatusEnum TicketStatus { get; set; }
        /// <summary>
        /// 验票时间
        /// </summary>
        public DateTime? CheckTime { get; set; }
        /// <summary>
        /// 是否打印
        /// </summary>
        public bool IsPrint { get; set; }

        /// <summary>
        /// 取票码
        /// </summary>
        public string CollectionCode { get; set; }
        /// <summary>
        /// 仓位
        /// </summary>
        public WareHousePosition WarePosition { get; set; }

    }
}
